<template>
	<view class="defAddress">
		<view class="addressWrap" v-if="address._id !== undefined">
			<view class="info">
				<text class="name" style="margin-right: 20rpx;">{{address.name}}</text>
				<text class="tel">{{address.mobile}}</text>
			</view>
			<text class="address">{{address.province+address.city+address.detail}}</text>
		</view>
		<u-empty
			v-else
			width="120"
			height="120"
			text="请设置默认收货地址!"
			icon="https://vkceyugu.cdn.bspapp.com/VKCEYUGU-8da6cc70-751c-428d-9aa0-6516abc1603f/6e75fb4e-3ea4-407f-a466-88d9fd11cf59.png">
		</u-empty>
	</view>
</template>

<script>
	export default {
		computed: {
			address() {
				return this.$store.state.shopping.defaultAddress
			}
		}
	}
</script>

<style lang="scss">
.defAddress{
	.addressWrap{
		padding: 20rpx;
		box-sizing: border-box;
		height: 160rpx;
		display: flex;
		flex-direction: column;
		background-color: rgba(31, 182, 131,0.2);
		border-radius: 20rpx;
		.info,.address{
			line-height: 60rpx;
		}
	}
}
</style>
